<template>
	<van-swipe :autoplay="2000" indicator-color="white" class="my-swipe" v-if="banners.length">
		<van-swipe-item v-for="(item,index) in banners" :key="index" class="my-swipe-item">
			<img v-lazy="item.img_url" alt="slides-pictures">
		
		</van-swipe-item>
	</van-swipe>


</template>
<!--首页轮播图-->
<script>


export default {
	name: "HomeSwipe",
	props: {
		banners: {
			type: Array,
			default() {
				return []
			}
		}
		
	},
	setup(props) {
		
		return {}
	}
}
</script>

<style scoped>
/*.my-swipe{*/
/*	height: 150px;*/
/*}*/

.my-swipe .van-swipe-item {
	color: #fff;
	font-size: 20px;
	/*line-height: auto;*/
	text-align: center;
}

.my-swipe-item img {
	height: auto;
	width: 100%;
}
</style>